@using Microsoft.AspNet.Identity
@if (Request.IsAuthenticated)
{
    using (Html.BeginForm("LogOff", "Account", routeValues: new { area = "" }, method: FormMethod.Post, htmlAttributes: new { id = "logoutForm", @class = "navbar-form pull-right" }))
    {
    @Html.AntiForgeryToken()
            
    <ul class="nav navbar-nav pull-right nav-lower">
        <li>@Html.ActionLink("Blog", "Index", "BlogData", routeValues: new { area = "", controller = "BlogData", action = "Index" }, htmlAttributes: null)</li>
        <li>@Html.ActionLink("Layout", "Index", "BlogLayoutData", routeValues: new { area = "", controller = "BlogLayoutData", action = "Index" }, htmlAttributes: null)</li>
        <li>@Html.ActionLink("Posts", "Index", "PostEntry", routeValues: new { area = "Blogs", username = User.Identity.Name, blogname = LynxWebLog.CookieFacade.CurrentBlog, controller = "PostEntry", action = "Index" }, htmlAttributes: null)</li>
        <li>@Html.ActionLink("Categories", "Index", "CategoryData", routeValues: new { area = "", controller = "CategoryData", action = "Index" }, htmlAttributes: null)</li>
        <li>@Html.ActionLink("Pages", "Index", "PageEntry", routeValues: new { area = "Pages", username = User.Identity.Name, blogname = LynxWebLog.CookieFacade.CurrentBlog, controller = "PageEntry", action = "Index" }, htmlAttributes: null)</li>
        <li>
            @Html.ActionLink("Hello " + User.Identity.GetUserName() + "!", "Manage", "Account", routeValues: new { area = "" }, htmlAttributes: new { title = "Manage" })
        </li>
        <li><a href="javascript:document.getElementById('logoutForm').submit()">Log off</a></li>
    </ul>
    }
} else {
    <ul class="nav navbar-nav pull-right">
        <li>@Html.ActionLink("Register", "Register", "Account", routeValues: new { area = "" }, htmlAttributes: new { id = "registerLink" })</li>
        <li>@Html.ActionLink("Log in", "Login", "Account", routeValues: new { area = "" }, htmlAttributes: new { id = "loginLink" })</li>
    </ul>
}
